<template>
  <div id="bigData" class="product-detail">
    <!-- 产品头部 -->
    <div class="product-hero">
      <div class="hero-content">
        <div class="hero-badge">
          <span class="badge-text">高性能数据库</span>
        </div>
        <h1 class="hero-title">GuDB数据库引擎</h1>
        <div class="hero-slogan">
          <h2>"小到 2 MB，快到 10 万 QPS，MySQL 语法，PostgreSQL 心脏"</h2>
        </div>
        <p class="hero-subtitle">专为资源受限环境设计的轻量级嵌入式关系型数据库</p>
        
        <div class="hero-badges">
          <span class="version-badge">v1.6-draft</span>
          <span class="license-badge">BSD-3-Clause</span>
          <span class="tech-badge">C99</span>
        </div>
      </div>
      <div class="hero-visual">
        <div class="visual-container">
          <img src="../assets/img/service2.jpg" alt="GuDB数据库引擎" class="hero-image" />
          <div class="performance-overlay">
            <div class="perf-card qps">
              <span class="perf-number">100K</span>
              <span class="perf-label">QPS</span>
            </div>
            <div class="perf-card size">
              <span class="perf-number">2MB</span>
              <span class="perf-label">Size</span>
            </div>
            <div class="perf-card compat">
              <span class="perf-number">90%</span>
              <span class="perf-label">MySQL兼容</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 核心特性 -->
    <div class="core-features">
      <div class="section-header">
        <h2>核心优势</h2>
        <p>将MySQL的易用性与PostgreSQL的先进技术完美结合</p>
      </div>
      
      <div class="features-showcase">
        <div class="feature-highlight">
          <div class="feature-icon ultra-light">
            <i class="glyphicon glyphicon-compressed"></i>
          </div>
          <h3>超轻量设计</h3>
          <p>单文件C99源码，零外部依赖，编译后仅 ≈2MB</p>
        </div>
        
        <div class="feature-highlight">
          <div class="feature-icon high-perf">
            <i class="glyphicon glyphicon-flash"></i>
          </div>
          <h3>极致性能</h3>
          <p>目标性能 10万 QPS / 100万 TPS</p>
        </div>
        
        <div class="feature-highlight">
          <div class="feature-icon mysql-compat">
            <i class="glyphicon glyphicon-wrench"></i>
          </div>
          <h3>MySQL兼容</h3>
          <p>支持 >90% 常用 MySQL 语法和 binlog 格式</p>
        </div>
      </div>
    </div>

    <!-- 产品特色 -->
    <div class="product-features">
      <div class="section-header">
        <h2>产品特色</h2>
        <p>企业级功能，轻量级体验</p>
      </div>
      
      <div class="features-grid">
        <div class="feature-card wow fadeInUp" data-wow-delay="0.1s">
          <div class="feature-icon">
            <i class="glyphicon glyphicon-compressed"></i>
          </div>
          <h3>轻量架构</h3>
          <p>单文件C99源码，零外部依赖，快速集成</p>
          <ul class="feature-details">
            <li>零配置部署</li>
            <li>内存占用极小</li>
            <li>启动速度快</li>
          </ul>
        </div>
        
        <div class="feature-card wow fadeInUp" data-wow-delay="0.2s">
          <div class="feature-icon">
            <i class="glyphicon glyphicon-heart"></i>
          </div>
          <h3>PostgreSQL内核</h3>
          <p>采用先进的数据库技术架构</p>
          <ul class="feature-details">
            <li>MVCC并发控制</li>
            <li>WAL预写日志</li>
            <li>Bw-Tree索引</li>
          </ul>
        </div>
        
        <div class="feature-card wow fadeInUp" data-wow-delay="0.3s">
          <div class="feature-icon">
            <i class="glyphicon glyphicon-lock"></i>
          </div>
          <h3>企业级安全</h3>
          <p>完整的安全保护机制</p>
          <ul class="feature-details">
            <li>AES-256加密</li>
            <li>RBAC权限控制</li>
            <li>TLS传输加密</li>
          </ul>
        </div>
        
        <div class="feature-card wow fadeInUp" data-wow-delay="0.4s">
          <div class="feature-icon">
            <i class="glyphicon glyphicon-stats"></i>
          </div>
          <h3>智能优化</h3>
          <p>自动优化查询性能</p>
          <ul class="feature-details">
            <li>自适应JIT编译</li>
            <li>智能查询优化</li>
            <li>动态内存管理</li>
          </ul>
        </div>
      </div>
    </div>

    <!-- 性能基准 -->
    <div class="performance-section">
      <div class="section-header">
        <h2>性能基准测试</h2>
        <p>在资源受限环境下展现卓越性能</p>
      </div>
      
      <div class="performance-stats">
        <div class="stat-card">
          <div class="stat-icon">⚡</div>
          <span class="stat-number">100,000</span>
          <span class="stat-label">QPS (8线程读写)</span>
        </div>
        <div class="stat-card">
          <div class="stat-icon">📊</div>
          <span class="stat-number">80,000</span>
          <span class="stat-label">TPS (单线程写入)</span>
        </div>
        <div class="stat-card">
          <div class="stat-icon">🔍</div>
          <span class="stat-number">120,000</span>
          <span class="stat-label">QPS (点查询)</span>
        </div>
        <div class="stat-card">
          <div class="stat-icon">⏱️</div>
          <span class="stat-number">5ms</span>
          <span class="stat-label">平均延迟</span>
        </div>
      </div>
    </div>

    <!-- CTA区域 -->
    <div class="product-cta">
      <div class="cta-content">
        <h2>体验极致的数据库性能</h2>
        <p>立即下载 GuDB，感受轻量级数据库的强大威力</p>
        <div class="cta-buttons">
          <a href="#" class="btn-primary">立即下载</a>
          <a href="#" class="btn-secondary">查看文档</a>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup name="bigData">
import { onMounted } from 'vue'
import WOW from 'wow.js'

onMounted(() => {
  const wow = new WOW({
    boxClass: 'wow',
    animateClass: 'animated',
    offset: 0,
    mobile: true,
    live: true
  })
  wow.init()
})
</script>

<style scoped>
/* GuDB专用样式 */
.product-detail {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  color: #1d1d1f;
}

/* 产品头部 */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  margin-bottom: 24px;
}

.badge-text {
  display: inline-block;
  background: rgba(52, 199, 89, 0.08);
  color: #34c759;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero-slogan h2 {
  font-size: 20px;
  color: #e74c3c;
  font-style: italic;
  text-align: center;
  background: linear-gradient(135deg, #fff5f5 0%, #fee);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #e74c3c;
  margin: 0 0 24px 0;
  line-height: 1.4;
}

.hero-subtitle {
  font-size: 19px;
  color: #86868b;
  margin: 0 0 32px 0;
  line-height: 1.42;
}

.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.version-badge,
.license-badge,
.tech-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.version-badge {
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
}

.license-badge {
  background: rgba(52, 199, 89, 0.08);
  color: #34c759;
}

.tech-badge {
  background: rgba(255, 149, 0, 0.08);
  color: #ff9500;
}

/* 视觉区域 */
.hero-visual {
  position: relative;
}

.visual-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.performance-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.perf-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.perf-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #1d1d1f;
}

.perf-label {
  font-size: 12px;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 核心特性 */
.core-features {
  padding: 120px 0;
  background: #f5f5f7;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 19px;
  color: #86868b;
  margin: 0;
  line-height: 1.42;
}

.features-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.feature-highlight {
  background: #ffffff;
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s ease;
}

.feature-highlight:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
}

.feature-icon.ultra-light {
  background: linear-gradient(135deg, #30d158, #28a745);
}

.feature-icon.high-perf {
  background: linear-gradient(135deg, #ff9500, #ff6b00);
}

.feature-icon.mysql-compat {
  background: linear-gradient(135deg, #007aff, #0051d5);
}

.feature-icon i {
  font-size: 32px;
  color: #ffffff;
}

.feature-highlight h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
}

.feature-highlight p {
  font-size: 17px;
  color: #515154;
  line-height: 1.47;
  margin: 0;
}

/* 产品特色 */
.product-features {
  padding: 120px 0;
  background: #ffffff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.feature-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 40px 32px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(52, 199, 89, 0.1);
}

.feature-card .feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #34c759, #30d158);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-card .feature-icon i {
  font-size: 24px;
  color: #ffffff;
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.feature-card p {
  font-size: 16px;
  font-weight: 400;
  color: #515154;
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.feature-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-details li {
  font-size: 14px;
  color: #86868b;
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.feature-details li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #30d158;
  font-weight: 600;
}

/* 性能基准 */
.performance-section {
  padding: 120px 0;
  background: #f5f5f7;
}

.performance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.stat-card {
  background: linear-gradient(135deg, #1d1d1f, #2d2d30);
  color: #ffffff;
  padding: 40px 32px;
  border-radius: 18px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #a1a1a6;
}

/* CTA区域 */
.product-cta {
  padding: 120px 0;
  background: #1d1d1f;
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: #f5f5f7;
  margin: 0 0 16px 0;
}

.cta-content p {
  font-size: 19px;
  color: #a1a1a6;
  margin: 0 0 40px 0;
  line-height: 1.42;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 16px 32px;
  font-size: 17px;
  font-weight: 400;
  border-radius: 980px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 160px;
}

.btn-primary {
  background: #34c759;
  color: #ffffff;
  border: 2px solid #34c759;
}

.btn-primary:hover {
  background: #30d158;
  border-color: #30d158;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 199, 89, 0.4);
  text-decoration: none;
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: #34c759;
  border: 2px solid rgba(52, 199, 89, 0.8);
}

.btn-secondary:hover {
  background: rgba(52, 199, 89, 0.1);
  color: #30d158;
  border-color: #34c759;
  transform: translateY(-2px);
  text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .product-hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 0;
  }

  .performance-overlay {
    flex-direction: column;
    gap: 12px;
  }

  .perf-card {
    padding: 12px 16px;
  }

  .core-features,
  .product-features,
  .performance-section,
  .product-cta {
    padding: 80px 0;
  }

  .features-showcase {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-highlight {
    padding: 32px 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-card {
    padding: 32px 24px;
  }

  .performance-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-card {
    padding: 32px 24px;
  }
}
</style>